import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home.vue'
import About from '@/views/About.vue'
import Search from '@/views/Search.vue'

Vue.use(VueRouter)
// 路由跳转
const routes = [
  {
    path: '/Home',
    name: 'home',
    component: Home
  },
  {
    path: '/About',
    name: 'about',
    component: About
  },
  {
    path: '/search',
    name: 'search',
    component: Search
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
